updated build setup to modern pyproject.toml form.#3783
updated build setup to modern pyproject.toml form.#3783mmerickel merged 23 commits intoPylons:mainfrom
Conversation
Dependency groups have been standardized, you could define them. |
|
Instead of having the files requirements_docs.txt and requirements_test.txt you can add these as optional-dependencies to the pyproject.toml: [project.optional-dependencies]
doc = [
"Sphinx >= 3.0.0",
# ...
]
test = [
"webtest >= 1.3.1",
# ...
] |
|
Another way to declare dependencies. uv supports both this option and the one @robvdl mentioned. https://docs.astral.sh/uv/concepts/projects/dependencies/ [dependency-groups]
dev = [
"webtest>=1.3.1",
]
docs = [
"Sphinx>=3.0.0",
] |
|
I tried to allow changes by project admins -- so feel free to go fix stuff yourselves :-) Meanwhile, I'll address a few points now. |
if that's the case, then I"ll go with option (1) :) But if the project wants to go to uv (or hatch?) rather than setuptools, then we can follow the appropriate route. But anyway, we need something that pip understands .... it looks like option(1) works -- I'll push and see if the RTD CI script works. |
|
OK -- all looking good. Note that the gitHub workflows aren't running, so could be broken -- that needs approval from a maintainer. Also -- it looks like the docs are being built on RTD, and also in a gitHub workflow -- is one of these obsolete? Finally -- I suspect the tox config could use some updating, but that's not my wheelhouse. |
If I understand correctly, the workflow is for testing that docs will build, whereas the RTD config is for deployment of docs after merging the PR. |
|
RTD pull request preview: https://pylons--3783.org.readthedocs.build/projects/pyramid/en/3783/ Lots of failing CI checks, though. |
Co-authored-by: Steve Piercy <[email protected]>
yup -- I couldn't test until they go turned on .... I'll see what I can figure out. |
|
hmm -- looks like the workflow still needs to be approved, so I can't see if the CI will work. But in any case, it's a tox config issue, I I really don't know tox. I did add the test dependencies, and that has helped some (locally) -- though it seem that tox should be able to get those from the pyproject.toml,. if we can find the right configuration. |
Ahh -- that makes sense, yes. |
|
Ping! Can we get this rolling again? I think it needs a bit more -- e.g. we should now pin setuptools, and maybe remove py3.9 and add py3.14 (if that doesn't break anything). (and for both those reasons, and maybe more, a point release might be in order) I can't recall where I left off with this -- but I'll refresh my brain if someone will agree to review and merge. I think I was stuck on the CI not having permission to run on the PR, so I can't really test anything :-( |
|
@ChrisBarker-NOAA I think this is pretty good - do you have time to fix it in the next day or so? Otherwise I may try to finish it up. Let me know - thanks! |
|
I'll try to clean it up now :-) |
|
I think I've got the tox ini working right now for the deps. though I can't run it all locally, so ??? I'm also getting a failure in check-manifest that confuses me: I can't see where setup.cfg is getting added to the manifest?? Anyway -- I really dont know tox, so any more is up to you :-) |
|
No problem I'll run with this and tweak it to where I want it to be. You already did the annoying parts of the conversion! Thank you so much for working on it. |
|
Getting there -- thanks! |
|
@ChrisBarker-NOAA I pushed several changes, can you let me know if you approve or see anything more that I missed? Thank you! |
|
Awesome, thanks! |
I've moved everything from setup.py and setup.cfg to pyproject.toml.
It seems to build fine :-)
There doesn't seem to be a clear way to specify test and docs requirements, so I added:
requirements_test.txtandrequirements_docs.txtOr maybe tox takes care of that now?
I also didn't update any pinned versions....
[though I changed the min Python version to 3.9, and added 3.13 to the tox test list]
I'm not set up to properly run tox, so maybe there's something more to do there, but I kept it as it was, other than the python versions in the test matrix.